	<script language="javascript" >
	function changev(code){
	var ar = code.split('-');
	code = ar[0];
	count = ar[1];
	switch(count.length)
	{
	case 1:count = '000'+count;
	break
	case 2:count = '00'+count;
	break
	case 3:count = '0'+count;
	break
	default: count = count;
	}
	document.getElementById('simple_code').value = code + count;
	//alert(tmp);
	}
	</script>
<form id="upload" method='post' action="__URL__/addPdt/" enctype="multipart/form-data">

	<label><span style="color:#FF0000">*</span>商品图片<br />
	<input name="image" id="image" type="file" class="button" /></label><br/><br />

	<label>商品大类编码(选择对应大类)<br />
	<select name="codelist" type="text"  id="codelist" onchange="changev(this.value)" >
	<volist name="pdtcodeList" id="pdtcodeList">	
	<option value="{$pdtcodeList['cat_code']}-{$pdtcodeList['counter']}">	
	{$pdtcodeList['cat_code']}::{$pdtcodeList['describe']}::编码计数器：{$pdtcodeList['counter']}
	</option>
	</volist>
	</select>	
  	</label><br>

	<br>	
	<label><span style="color:#FF0000">*不可重复</span>商品编码(自动生成)<br />
	<input name="simple_code" type="text" value=""  tabindex="2" id="simple_code" readonly="ture" ></label><br/><br />
	<label><span style="color:#FF0000">* 不可重名</span>商品名称<br />
	<input name="product_name" type="text" value=""  tabindex="2" id="product_name" ></label><br/><br />
	<label><span style="color:#FF0000">*</span>单品重量(单位:克)<br />
	<input name="weight" type="text" value=""  tabindex="2" id="weight" ></label><br/> <br />
	<label>初始化库存数量<br />
	<input name="init_count" type="text" value=""  tabindex="3" id="init_count" ></label><br>	
	<label>对应位置码<br />
	<input name="init_loc" type="text" value=""  tabindex="4" id="init_loc" ></label><br>		
	<input name="submit" type="submit" class="button" id="submit" value="初始化商品信息">
	注：<span style="color:#FF0000">*</span> 为必填 
</form>
</div>
</div>

</div>
 </body>
</html>
